<template>
  <div class="goods-box">
    <div class="gengduo">
      <div
        v-for="(b, index) in rexiao"
        :key="index"
        style="width: 100%; display: flex; align-items: center"
      >
        <img :src="b.img" style="width: 39%" />
        <div
          style="
            margin-left: 0.15rem;
            height: 1.7rem;
            border-bottom: 1px solid #ccc;
            display: flex;
            flex-direction: column;
            justify-content: space-evenly;
          "
        >
          <p>{{ b.name }}</p>
          <p style="font-size: 0.18rem; margin-top: 0.3rem">￥{{ b.price }}</p>
          <div
            style="display: flex; align-items: flex-end; margin-bottom: 0.1rem"
          >
            <van-icon name="shop-o" size="0.18rem" />
            <p>{{ b.dianpu }}</p>
            <van-icon name="arrow" />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import axios from "axios";
export default {
  name: "goodsrexiao",
  data() {
    return {
      rexiao: [],
    };
  },
  created() {
    axios({
      url: "/rexiao",
      method: "get",
    }).then((res) => {
      this.rexiao = res.data;
      console.log(res.data);
    });
  },
};
</script>
<style scoped>
.gengduo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 0.2rem;
}
.gengduo div {
  margin-top: 0.1rem;
}
.gengduo div p:nth-child(1) {
  font-size: 0.16rem;
  /* padding-left: 0.1rem; */
}
.gengduo div p:nth-child(2) {
  margin-top: 0.2rem;
  /* padding-left: 0.1rem; */
  font-size: 0.14rem;
}
</style>